﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/Site2.Master" AutoEventWireup="true"
    CodeBehind="SearchPatient.aspx.cs" Inherits="CDOP.SearchPatient" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="dvSearchParms" runat="server">
        <asp:Table ID="tblSearchParams" runat="server">
            <asp:TableRow>
                <asp:TableCell>
                    <asp:Label ID="Label2" runat="server" Text="Enter First name"></asp:Label>
                </asp:TableCell>
                <asp:TableCell>
                    <asp:TextBox ID="txtFirstName" runat="server">
                    </asp:TextBox>
                </asp:TableCell>
                <asp:TableCell>
                    <asp:Button ID="btnFirstName" runat="server" Text="Search By First Name   " OnClick="BtnFirstNameClick" />
                </asp:TableCell>
            </asp:TableRow>
            <asp:TableRow>
                <asp:TableCell>
                    <asp:Label ID="Label1" runat="server" Text="Enter Last name"></asp:Label>
                </asp:TableCell>
                <asp:TableCell>
                    <asp:TextBox ID="txtLastName" runat="server">
                    </asp:TextBox>
                </asp:TableCell>
                <asp:TableCell>
                    <asp:Button ID="btnLastName" runat="server" Text="Search By Last Name   " OnClick="BtnLastNameClick" />
                </asp:TableCell>
            </asp:TableRow>
            <asp:TableRow>
                <asp:TableCell>
                    <asp:Label ID="Label3" runat="server" Text="Enter NHS Number"></asp:Label>
                </asp:TableCell>
                <asp:TableCell>
                    <asp:TextBox ID="txtNhsNumber" runat="server">
                    </asp:TextBox>
                </asp:TableCell>
                <asp:TableCell>
                    <asp:Button ID="btnNhsNumber" runat="server" Text="Search By NHS Number" OnClick="BtnNhsNumberClick" />
                </asp:TableCell>
            </asp:TableRow>
            <asp:TableRow>
                <asp:TableCell>
                    <asp:Label ID="Label4" runat="server" Text="Enter CDOP Reference"></asp:Label>
                </asp:TableCell>
                <asp:TableCell>
                    <asp:TextBox ID="txtCdopRef" runat="server">
                    </asp:TextBox>
                </asp:TableCell>
                <asp:TableCell>
                    <asp:Button ID="btnCdopRef" runat="server" Text="Search By CDOP Reference" OnClick="BtnCdopRefClick" />
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
        <br />
        <hr />
        <asp:Button ID="btnShowAll" runat="server" Text="Show All the Records" OnClick="BtnShowAllClick" />
        <asp:Button ID="btnExport" runat="server" Text="Export To Excel" 
            onclick="BtnExportClick" />
    </div>
    <div id="dvSearchResult" runat="server">
        <h1>
            Patient Results</h1>
        <br />
        <asp:GridView ID="grdPatients" runat="server" AutoGenerateColumns="False" CellPadding="4"
            ForeColor="#333333" GridLines="None" 
            onrowdeleting="GrdPatientsRowDeleting">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:BoundField DataField="CDOP_Ref" HeaderText="CDOP No" SortExpression="CDOP_Ref" />
                <asp:BoundField DataField="Nhs_Number" HeaderText="Nhs No" SortExpression="Nhs_Number" />
                <asp:BoundField DataField="First_Name" HeaderText="First Name" SortExpression="First_Name" />
                <asp:BoundField DataField="Surname" HeaderText="Surname" SortExpression="Surname" />
                <asp:BoundField DataField="Gender" HeaderText="Gender" SortExpression="Gender" />
                <asp:BoundField DataField="Date_of_Death" HeaderText="Date of Death" SortExpression="Date_of_Death" />
                <asp:BoundField DataField="Date_of_Notification" HeaderText="Date of Notification"
                    SortExpression="Date_of_Notification" />
                <asp:BoundField DataField="PostCode" HeaderText="Post Code" SortExpression="PostCode" />
                <asp:BoundField DataField="Ethnic_Group" HeaderText="Ethnic Group" SortExpression="Ethnic_Group" />
                <asp:BoundField DataField="Asylum_Seeker" HeaderText="Asylum Seeker" SortExpression="Asylum_Seeker" />
                <asp:BoundField DataField="Categorisation_of_Death" HeaderText="Category" SortExpression="Categorisation_of_Death" />
                <asp:BoundField DataField="Mode_of_Death" HeaderText="Mode" SortExpression="Mode_of_Death" />
                <asp:HyperLinkField DataNavigateUrlFields="CDOP_Ref" DataTextField="CDOP_Ref" DataNavigateUrlFormatString="AddMasterDetailsData.aspx?id={0}&isView=t"
                    DataTextFormatString="View Record" />
                <asp:HyperLinkField DataNavigateUrlFields="CDOP_Ref" DataTextField="CDOP_Ref" DataNavigateUrlFormatString="AddMasterDetailsData.aspx?id={0}&isView=f"
                    DataTextFormatString="Update Record" />
                <asp:CommandField HeaderText="Delete" ShowDeleteButton="True" ShowHeader="True" />
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
    </div>
    <div id="dvPagination" runat="server">
        <asp:Button ID="btnPrevious" CommandName="Previous" runat="server" OnCommand="ChangePage"
            Text="Previous" />
        <asp:Button ID="btnNext" runat="server" CommandName="Next" OnCommand="ChangePage"
            Text="Next" />
        <br />
        <asp:Label ID="lblTotal" runat="server" Text="Total Page"> </asp:Label>
        <asp:Label ID="lbltotalPageNo" runat="server"> </asp:Label>
        <br />
        <asp:Label ID="lblcurrent" runat="server" Text="Current Page"> </asp:Label>
        <asp:Label ID="lblCurrentPage" runat="server"> </asp:Label>
    </div>
</asp:Content>
